home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / tcoop.arc / TCOOP2.ARC / GBUTTON.H < prev    next >
Encoding:
C/C++ Source or Header  |  1991-10-26  |  895 b   |  40 lines

  1. // gbutton.h: Graphics button class definitions
  2.  
  3. #ifndef H_GBUTTON
  4. #define H_GBUTTON
  5.  
  6. #include "grphscrn.h"
  7.  
  8. typedef void (*ActionProc)(Wso *Src, MsgPkt &M);
  9. typedef void (*DrawProc)(Wso *Src);
  10.  
  11. class TextButton : public Wso {
  12. public:
  13.   ActionProc Action;
  14.   char Str[80];
  15.   char Font[80];
  16.   TextButton(char *S, char *F, int Ba, int Fa, 
  17.              ColorPak &Cp, ActionProc A);
  18.   virtual void Draw(void);
  19.   virtual void Activate(MsgPkt &M); 
  20.   virtual void ChangeText(char *S, char *F);
  21. };
  22.  
  23. class IconButton : public Wso {
  24. public:
  25.   ActionProc Action;
  26.   DrawProc DrawIcon;
  27.   IconButton(DrawProc D, int Ba, int Fa, ColorPak &Cp, ActionProc A);
  28.   virtual void Draw(void);
  29.   virtual void Activate(MsgPkt &M); 
  30. };
  31.  
  32. // ---------------- Some common button actions -------------- 
  33.  
  34. void NoOp(Wso *Src, MsgPkt &M);
  35. void ExitAction(Wso *Src, MsgPkt &M);
  36.  
  37. #endif
  38.  
  39.  
  40.